 $(function() {//When the Dom is ready

                base_url=$('#base_url').val();
                ajax_url=$('#ajax_url').val();
                rubro_url=$('#get_url').val();

                $('.load_more').live("click",function() {//If user clicks on hyperlink with class name = load_more
                    var ultimo_id = $(this).attr("id");
                    //Get the id of this hyperlink 
                    //this id indicate the row id in the database 
                    if(ultimo_id!='end'){
                        //if  the hyperlink id is not equal to "end"
                        $.ajax({//Make the Ajax Request
                            type: "POST",
                            url: base_url+ajax_url+rubro_url,
                            data: "ultimo_id="+ ultimo_id, 
                            beforeSend:  function() {
                                $('a.load_more').html("<img src="+base_url+"images/loading.gif />");//Loading image during the Ajax Request
  
                            },
                            success: function(html){//html = the server response html code
                                $("#more").remove();//Remove the div with id=more 
                                $("ul#updates").append(html)//Append the html returned by the server .
                            }
                        });
  
                    }
                    return false;
                });
            });